package com.atguigu.order.test;

import com.atguigu.order.entity.PayLog;
import com.atguigu.order.service.PayLogService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Date;

/**
 * @author kabuda
 * @create 2023-05-19 21:17
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class test {
    @Autowired
    private PayLogService payLogService;

    @Test
    public void test(){
        //向支付表添加支付记录
        PayLog payLog = new PayLog();
        payLog.setPayTime(new Date()); //订单完成时间
        payLog.setPayType(1);//支付类型 1微信
        payLogService.save(payLog);
    }

}
